package Day024_枚举_正则表达式.demo1_枚举;

/**
 * @author zhangyan
 * @date 2020/5/18 9:15
 */
public class Person1 {
    //可以直接在Person1类外再定义一个"enum类"
    enum Sex{
        BOY,GIRL
    }
    String name;
    //Sex是一种数据类型,可以定义变量
    Sex sex;

    public Person1() {
    }

    public Person1(String name, Sex sex) {
        this.name = name;
        this.sex = sex;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Sex getSex() {
        return sex;
    }

    public void setSex(Sex sex) {
        this.sex = sex;
    }

    @Override
    public String toString() {
        return "Person1{" +
                "name='" + name + '\'' +
                ", sex=" + sex +
                '}';
    }
}
